﻿IF object_id(N'dbo.UDS_CM_ClientContact_Linkman', 'U') IS NULL
BEGIN
    CREATE TABLE [dbo].[UDS_CM_ClientContact_Linkman] (
        [ID]        int NOT NULL identity(1, 1),
        [ContactID] int NULL,
        [LinkmanID] int NULL,

        CONSTRAINT [PK_UDS_CM_ClientContact_Linkman] PRIMARY KEY CLUSTERED ([ID] asc),
        CONSTRAINT [FK_UDS_CM_ClientContact_Linkman_UDS_CM_ClientContact] FOREIGN KEY ([ContactID]) REFERENCES [dbo].[UDS_CM_ClientContact] ([ID]),
        CONSTRAINT [FK_UDS_CM_ClientContact_Linkman_UDS_CM_Linkman] FOREIGN KEY ([LinkmanID]) REFERENCES [dbo].[UDS_CM_Linkman] ([ID])
    );
END
GO
